<!DOCTYPE html>
<html lang="zh-CN" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript" th:src="@{js/jquery/jquery-3.4.1.min.js}"></script>
    <link rel="stylesheet" th:href="@{layui/css/layui.css}">
    <script type="application/javascript" th:src="@{layui/layui.all.js}"></script>
</head>
<body>
<span th:text="${userName}"></span>
<div id="data"></div>
<button id="logout">注销</button>
<button id="cdHtml">光盘数据显示</button>
<button id="noticeTest">测试通知</button>
</body>
<script>
    $(function () {
        initData();
    })
    function initData() {
        $.ajax({
            url:"/db/getProject",
            data:{},
            dataType:"json",
            type:"post",
            success:function (data) {
                layer.msg(JSON.stringify(data));
                $("#data").html(JSON.stringify(data));
            }
        })
    }
    $("#logout").click(function () {
        window.open("/logout","_self");
    })
    $("#cdHtml").click(function () {
        window.open("/cdHtml","_self");
    })
    $("#noticeTest").click(function () {
        window.open("/notice/noticeHtml","_self");
    })
</script>
</html>